-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Storybook] Improve typing, add doc links & remove redundant JSDoc in preview.tsx #11745
Conversation
Philzen
commented
Dec 5, 2024
- Migrate v6-style export to Storybook 7 default export (as per https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#default-export-in-previewjs)
- Remove redundant JS-style type import
- add typing for preview config object
- add doc link for globalTypes config
- Migrate v6-style export to Storybook 7 default export (as per https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#default-export-in-previewjs) - Remove redundant JS-style type import - add typing for preview config object - add doc link for globalTypes config
I did a little test an am getting the impression this file is not being used at all atm. Tried deleting storybook from my package.json and then tried setting up on RW v7 both Looking at Philzen@8fb0f86 … is it possible that |
@arimendelow Could you please have a look at @Philzen's latest comment here? About removing |
- Migrate v6-style export to Storybook 7 default export (as per https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#default-export-in-previewjs) - Remove redundant JS-style type import - add typing for preview config object - add doc link for globalTypes config
Ah nevermind about this one – at least i can see that this file is still required for https://github.com/redwoodjs/redwood/blob/v8.4.1/packages/cli/src/commands/setup/ui/libraries/chakra-ui.js#L10 However the question about the Still it may be a good idea to copy (instead of moving) it over to |
…ok 7 style - Migrate v6-style export to Storybook 7 default export (as per https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#default-export-in-previewjs) - Remove redundant JS-style type import - add typing for preview config object - add doc link for decorator config
…k 7 style - Migrate v6-style export to Storybook 7 default export (as per https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#default-export-in-previewjs) - Remove redundant JS-style type import - add typing for preview config object - add doc link for decorators config - shorten decorators component
Was otherwise violating (import/order) rule: - `react-i18next` import should occur after type import of `@storybook/react` - There should be at least one empty line between import groups
Hi all! This need no longer exists. The ChakraUI integration needs to be updated :) On the And then add a block like this one for creating it in the project: https://github.com/redwoodjs/redwood/blob/85511daa303ec4c135339e3cc0865ee149ece145/packages/cli-packages/storybook-vite/src/commands/storybookHandler.ts#L98C1-L116C4 |
So @Philzen you are correct — the file is no longer being used, and these all need to be updated to work with the new integration — it's not just the formatting that needs to change. |
@arimendelow many thanks for chiming in!
Still, from looking at https://github.com/redwoodjs/redwood/blob/v8.4.1/packages/cli/src/commands/setup/ui/libraries/chakra-ui.js#L10 it seems still required – maybe that can be refactored so all SB-Webpack related stuff can be deleted (as i understand with RW 8 webpack is gone for good)?
I'd very much support that – gives much more of a turnkey experience. Thanks for outlining the steps required – however as i currently don't have a full local Redwood dev setup (and also given the above point where it still seems used) i'm a bit anxious making these changes myself w/o being able to fully test them. Hence my suggestion would be to
|
@arimendelow also i found these redwood/packages/project-config/src/paths.ts Lines 126 to 128 in 85511da
which look like they also need to be updated (i believe manager was also dropped in Storybook 7). |
Sounds good to me. I'll add a changeset and merge it |
@Philzen Can you please write up an issue with the remaining tasks? |